package com.woniuxy.controller;

import org.springframework.stereotype.Component;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
@RequestMapping(value = "/hello")
public class HelloController {
    @RequestMapping(value = "/hi")
    public ModelAndView hi(){
        ModelAndView modelAndView=new ModelAndView();
        System.out.println("=========基于注解的springmvc中的hi方法========");
        modelAndView.setViewName("/welcome.jsp");
        return modelAndView;
    }
    @RequestMapping(value = "/hh")
    public ModelAndView hh(){
        ModelAndView modelAndView=new ModelAndView();
        System.out.println("=========基于注解的springmvc中的hh方法========");
        modelAndView.setViewName("/welcome.jsp");
        return modelAndView;
    }
}
